Inside Macintosh: Macintosh Toolbox Essentials

Previous | Chapter Top | Chapter Contents | Next

Event Modifier Flags

Enumerators of type EventModifiers are used in the event record and its equivalent EvQE1 structure in the event queue to specify the state of the modifier keys and the mouse button at the time the event was posted.

typedef UInt16 EventModifiers;  /* event modifiers */
enum {
    activeFlag      = 0x0001,   /* set if window being activated or if
                                /* mouse-down event caused foreground
                                /* switch */
    btnState        = 0x0080,   /* set if mouse button up */
    cmdKey          = 0x0100,   /* set if Command key down */
    shiftKey        = 0x0200,   /* set if Shift key down */
    alphaLock       = 0x0400,   /* set if Caps Lock key down */
    optionKey       = 0x0800,   /* set if Option key down */
    controlKey      = 0x1000    /* set if Control key down */
};

Enumerator descriptions

activeFlag
The enumerator that indicates a window is being activated or that a mouse-down event caused a foreground switch.
btnState
The enumerator indicating that the mouse button has been released.
cmdKey
The enumerator indicating that the Command key is being pressed.
shiftKey
The enumerator indicating that the Shift key is being pressed.
alphaLock
The enumerator indicating that the Caps Lock key is being pressed.
optionKey
The enumerator indicating that the Option key is being pressed.
controlKey
The enumerator indicating that the Control key is being pressed.

For information about the event record and the EvQE1 structure, see "The Event Record" and "The Event Queue" .


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next